Configuring Response

The Response tab allows you to configure Rest response data into Platform object field by creating a response tree.

The response tree can be created in one of the following ways:

  • Using the Invoke REST Service option that enables you to invoke the REST service with the header and the request you have mapped using an existing record in Platform.
  • Using the Copy & Paste JSON option and passing a sample Response into a text area.

When you use the Invoke REST Service option, you must:

  1. Select record from the drop-down list and invoke a trigger or invoke REST service by either providing inline values for all your mappings that are done in the Header, Request, and URL builder tabs. The Select Record drop-down list will list top 10 records from your Platform objects.
  2. Once the response tree is built, you can add/update/delete more nodes by using toolbar buttons. This is useful if the schema is incomplete.
  3. Select a node under which you want to add a new node.
  4. Click the + icon to add a new node. Similarly, you can edit a node and change its datatype by using the edit icon. You can also delete a node by using delete icon.
    Note: At this stage, you can map a node from response object field to Platform object field (from right to left of the tree).
  5. Click OK to generate the code. You can then test and debug the trigger.

REST Service response

Note: Response data can be simple json object or have sub-objects returned in a json array. See Supporting simple and complex cases in Response mapping to know how response fields will be mapped to Platform fields.